The present invention relates to data storage, and more specifically, to data storage systems employing write caching.
Conventional data storage systems have employed write caches to improve write latency. For example, it is well known for a magnetic disk storage system to implement a write cache in Dynamic Random Access Memory (DRAM) because of the relatively low write latency of DRAM as compared to a magnetic disk drive, particularly for random (as opposed to sequential) addresses. In such embodiments, the disk storage system services a write command by storing the write data into the DRAM write cache and, if required, immediately signaling completion to the requester. The magnetic disk storage system thereafter destages the data from the DRAM write cache to magnetic disk drives, for example, during a period in which a relatively low number of access requests are received or due to capacity constraints in the DRAM write cache. In addition to reducing write latency, the DRAM write cache can reduce the overall amount of data written to the magnetic disk drives because data overwritten while held in the DRAM write cache is never written to the magnetic disk drives. Write caches have also been employed in data storage systems employing other bulk storage media, such as flash memory storage systems.
Management of write caches is often implemented in software rather than hardware due to the complexity of cache management operations and the flexibility provided by software implementation. The present invention recognizes that in software-managed write caches, each time an access request is received, a storage controller of the storage system must execute a sequence of instructions to perform a cache lookup to determine whether or not the target data block specified by the access request is held in the write cache. In the case of a write miss, the storage controller must additionally select a victim entry for eviction from the write cache and destage that victim entry from the write cache to the bulk storage if there is no free space in the write cache. In at least some designs, the processing performed by the storage processor to support use of the write cache can make the storage processor a critical resource under high request rates and reduce the rate at which the data storage system can service access requests.